# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-telethon
_pkgname=Telethon
_pyver=3.13
pkgver=1.25.4
pkgrel=7
epoch=1
pkgdesc='Full-featured Telegram client library for Python 3.'
arch=('any')
url='https://pypi.org/project/telethon/#files'
license=('MIT')
depends=('python' 'python-pyaes' 'python-rsa')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('a60e270d1135d0a6c459ea197b389ec8355bff87827faa5a6d710992fddf145f44d1795039e8cab339153bf75da4f0cf7194c8b52f94785468d8945812b703da')

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build

  rm -rf "$pkgdir/usr/lib/python$_pyver/site-packages/tests"
}

